Attribute Macrosยง
- Expand to
plugin_api_struct
+plugin_api_trait
- Define several useful functions for API struct.
- Define ffi call for each method in API struct.
- Define the
_ffi_call
function. All implemented traits should be passed, seperated by a comma. - Create a new implementation instance with
LazyLock
. - Mock a implementation without defining a real library.
- Define the root module in the plugin,
_ffi_call
must be defined in the same file. - Define how to invoke the methods.